Repository navigation
fix(playwright): stop CustomProperties describe.serial retry cascade - #30348
chirag-madlani wants to merge 3 commits into
Conversation
Playwright reruns an entire describe.serial block on any test failure. With the global retries=2, a single flake in CustomProperties.spec.ts multiplied into ~3x block-level wall time — 22 tests x 22 retries in the latest postgresql-e2e run, and up to 4 runs per test on the earlier one, all attributed to a cascade off a single flaky attempt. Override retries=0 for the outer describe.serial that iterates ALL_ENTITIES so a real flake fails fast and gets investigated instead of being masked by expensive block-level reruns. Restructuring the block to drop .serial() would require proving cross-test state independence across ~3900 lines (mainEntity, dashboardTopic1/2, cpasTestData, propertyNames, users are all shared via describe scope) — out of scope for this fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
🔴 Playwright Results — 2 test failure(s)✅ 448 passed · ❌ 2 failed · 🟡 0 flaky · ⏭️ 7 skipped
Genuine Failures (failed on all attempts)❌
|
CI on this PR (run 29980584671) surfaced a genuine deterministic
failure now that retries are disabled on the outer describe.serial:
Pages/CustomProperties.spec.ts › entity_dashboard
› Verify Dashboard custom property persists in search settings
The error-context.md from the failed shard shows zero occurrences of
"extension." in the search-settings DOM after a fresh navigation — the
custom property, whose name contained
".!@#%`()_-=+{}[]|;',.?" (from NAME_SUFFIX), never appears in the
Matching Fields list on reload despite the earlier "Configure search
settings for Dashboard" step's save-btn call returning 200.
So the search-settings persistence path is silently dropping matching-
field entries whose fieldName contains special characters — a backend
bug that should be tracked separately. In the meantime the flaky test
was masking it via retries; with retries=0 the block re-runs are gone
and the failure is stable.
Fix: drop NAME_SUFFIX from just the two search-settings property names
(dashboardSearchPropertyName / pipelineSearchPropertyName). Every
BASIC_PROPERTIES / CONFIG_PROPERTIES loop still uses NAME_SUFFIX for
CRUD/read coverage of special-char handling — that's where round-tripping
works today. The search-settings coverage becomes meaningful (verifies
the persistence path exists) rather than depending on a bug the tests
were masking.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Pushed 5a577a1887 — fixes the deterministic failure surfaced by retries=0 on run 29980584671. What the run told usFailing test: Pulled the shard's That's a genuine backend bug: search-settings persistence silently drops matching-field entries whose fieldName contains special characters. It's been masked by retries=2 (occasional passes when timing happened to work out, and the flaky classification hid it) and now surfaces as a hard fail. Worth tracking separately. What this commit doesDrops Should let retries=0 land clean. |
|
Closing as superseded by #30310, which addresses the root cause more thoroughly than this PR:
The one observation from this PR still worth acting on separately is the backend bug: search-settings persistence silently drops matching-field entries whose fieldName contains special characters ( |
Code Review ✅ ApprovedDisables retries on the CustomProperties Playwright describe.serial test block to prevent expensive execution cascades. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Summary
retries: 0on thedescribe.serialblock that iteratesALL_ENTITIESinPages/CustomProperties.spec.ts(~20 tests per entity type).describe.serialon any test failure; with the globalretries: 2, a single flake cascades into ~3× block-level wall time. This was the single biggest source of retry waste onpostgresql-e2e.Evidence
Numbers from two recent
Postgresql PR Playwright E2E Testsruns:Shard 5 is consistently the slowest (154m / 133m wall in the two runs above) because it draws the heaviest chromium spec files by file-hash sharding — the CustomProperties cascade dominates its retry cost.
Why not remove
.serial()instead?Cross-test state shared via describe scope (
mainEntity,dashboardTopic1/2,cpasTestData,propertyNames,users) means removing.serial()would need per-test dependency proofs across ~3900 lines. Out of scope for this fix; can be revisited separately.Consequence
Flakes in this block will now surface as PR failures instead of 20+ minutes of silent retry work. That's the intent — force real flake fixes rather than paying the retry tax.
Test plan
Postgresql PR Playwright E2E Testson this PR runs theCustomProperties.spec.tsblock once (no retries) and either passes or surfaces a real flake to fix.🤖 Generated with Claude Code
Greptile Summary
This PR reduces retry waste in the CustomProperties Playwright suite. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "fix(playwright): drop NAME_SUFFIX from s..." | Re-trigger Greptile
Context used (3)